package com.example.configclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * </p>
 *
 * @author Zero
 * @since 2019/2/19
 */
@RefreshScope
@RestController
public class ExampleController {

    @Value("${hello:default}")
    private String hello;

    @GetMapping("/hello")
    public String hello() {
        return hello;
    }

}
